home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / cellgame.swf / scripts / frame_2 / PlaceObject2_21_13 / CLIPACTIONRECORD onClipEvent(load).as < prev    next >
Encoding:
Text File  |  2006-06-13  |  1.0 KB  |  37 lines

  1. onClipEvent(load){
  2.    function hit(whichShot)
  3.    {
  4.       if(whichShot != _root.newShot5000)
  5.       {
  6.          _root.actions.score += 50;
  7.       }
  8.       _root.actions.explosion(this);
  9.       removeMovieClip(whichShot);
  10.       removeMovieClip(this);
  11.       _X = _X + 20;
  12.    }
  13.    function go(degree)
  14.    {
  15.       _Y = _Y - speed * Math.cos(_rotation * 0.017453292519943295);
  16.       _X = _X + speed * Math.sin(_rotation * 0.017453292519943295);
  17.       if(_rotation < degree)
  18.       {
  19.          _rotation = _rotation + 15;
  20.       }
  21.       if(_rotation > degree)
  22.       {
  23.          _rotation = _rotation - 15;
  24.       }
  25.    }
  26.    if(_name != "paramecium")
  27.    {
  28.       angle = random(360);
  29.       _root.actions.totalcells = _root.actions.totalcells + 1;
  30.       _X = Math.sin(angle * 0.017453292519943295) * (_root.actions.radius2 + 10) + _root.actions.centerx;
  31.       _Y = Math.cos(angle * 0.017453292519943295) * (_root.actions.radius2 + 10) + _root.actions.centery;
  32.       moveTime = getTimer();
  33.       speed = random(4) + 4;
  34.       direction = random(9);
  35.    }
  36. }
  37.